local str = "abc123def456"
-- 匹配非数字到数字的边界
for num in string.gmatch(str, "%f[%d]%d+") do
    print(num)  -- 输出：123、456
    debug.traceback("gmatch");
end

local i = 1
local f = 1.1
local s = '1'
print("i number type:" , type(i), math.type(i))
print("f number type:" , type(f), math.type(f))
print("s number type:" , type(s), math.type(s))
print("i == f:", i == f, ',  s == i:', s == i)

print("i << 1", i << 1)

local i, r = pcall(function()
    print("f << 1", f << 1) -- 报错
    print("s << 1", s << 1) -- 报错
end)
print('<< result: ', i, r)

 assert(true, "assert error")

 print('package.path:', package.path)


print('------mata table----------')

local mt = {
    __index = function(t, k) 
        print("__index", k)
    end,
    __newindex = function(t, k, v)
        print("__newindex", k, v)
    end
}

local t = {a = 1}
setmetatable(t, mt)
t.a = 2;
print(t.a)
print(t.b)
t.b = 3;